From 2f3367fbf87974ba15b07c1b4a57774d20206372 Mon Sep 17 00:00:00 2001 From: Federico Mena Quintero Date: Fri, 11 Sep 2009 13:32:08 -0500 Subject: [PATCH] Make copy_attribute() a function instead of a macro Signed-off-by: Federico Mena Quintero --- gtk/gtkfilechooserdefault.c | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/gtk/gtkfilechooserdefault.c b/gtk/gtkfilechooserdefault.c index 31991c085f..0e5c405180 100644 --- a/gtk/gtkfilechooserdefault.c +++ b/gtk/gtkfilechooserdefault.c @@ -6577,13 +6577,15 @@ my_g_format_time_for_display (glong secs) return date_str; } -#define copy_attribute(to, from, attribute) G_STMT_START { \ - GFileAttributeType type; \ - gpointer value; \ -\ - if (g_file_info_get_attribute_data (from, attribute, &type, &value, NULL)) \ - g_file_info_set_attribute (to, attribute, type, value); \ -}G_STMT_END +static void +copy_attribute (GFileInfo *to, GFileInfo *from, const char *attribute) +{ + GFileAttributeType type; + gpointer value; + + if (g_file_info_get_attribute_data (from, attribute, &type, &value, NULL)) + g_file_info_set_attribute (to, attribute, type, value); +} static void file_system_model_got_thumbnail (GObject *object, GAsyncResult *res, gpointer data) -- 2.30.2